import java.util.Scanner;

public class J01Neicun {
    public static void main(String[] args) {
        int age = 3;
        //基本数据类型，打印值
        System.out.println("age = " + age);//3

        String[] nameArr={"鲁迅","牛顿"};
        //打印数组的名字
        //特殊之处，
        // 引用数据类型，默认打印变量名，其实是打印地址
        // 这个也可以不是地址，（自定义，以后再说）
        System.out.println("nameArr = " + nameArr);

        Scanner sc = new Scanner(System.in);
        System.out.println("sc = " + sc);

        String s1 = "abc";
        System.out.println("s1 = " + s1);
    }
}
class Neicun2{
    public static void main(String[] args) {
        //简单数据类型赋值，值复制过去
        int a = 6;
        int b = a;
        System.out.println("b = " + b);//6

        b = 100;
        System.out.println("a = " + a);
        System.out.println("b = " + b);


        System.out.println("引用数据类型，传地址");
        int[] aArr = {1,3};//0x100
        int[] bArr = aArr;//0x100

        bArr[0] = 100;

        System.out.println("aArr[0] = " + aArr[0]);
        System.out.println("bArr[0] = " + bArr[0]);
    }
}

class Neicun3{
    public static void main(String[] args) {
        System.out.println("引用数据类型，传地址");
        int[] aArr = {1,3};//0x100
        int[] bArr = {1,3};//

        bArr[0] = 100;

        System.out.println("aArr[0] = " + aArr[0]);//
        System.out.println("bArr[0] = " + bArr[0]);
    }
}